<?php
/**
 * Created by PhpStorm.
 * User: DELL-PC
 * Date: 2018/8/6
 * Time: 17:06
 */

namespace J\Schema;


use J\Exception;


/**
 * Where语句构造器接口
 */
interface IWhere
{
    /**
     * @return Sprite[][]
     */
    public function getCondition();

    /**
     * 增加OR语句
     * @param array|string $data
     * @return IWhere
     * @throws Exception
     */
    public function orCondition($data);

    /**
     * 增加AND查询条件
     *
     * @param array|string $data
     * @param int $index and语句索引
     * @return int
     * @throws Exception
     */
    public function andCondition($data, $index = -1);
}